import java.util.Random;



public class Desk {
	
	public Card talia [] = new Card[52];
	
	public Desk()
	{
		int wartosc_kart=2;
		int y=0;
		
		for(int i =0; i<13; i++)
		{
			if(wartosc_kart<=10)
			{
			  talia[y] = new Card("Clubs", wartosc_kart);
			  y++;
			  talia[y] = new Card("Diamonds", wartosc_kart);
			  y++;
			  talia[y] = new Card("Hearts", wartosc_kart);
			  y++;
			  talia[y] = new Card("Spades", wartosc_kart);
			  y++;
			 }
			else
				switch(wartosc_kart)
				{
				  case 11:
					  talia[y] = new Card("Clubs", "Jack", 11);
					  y++;
					  talia[y] = new Card("Diamonds", "Jack", 11);
					  y++;
					  talia[y] = new Card("Hearts", "Jack", 11);
					  y++;
					  talia[y] = new Card("Spades","Jack", 11);
					  y++;
					  break;
				  case 12:
					  talia[y] = new Card("Clubs", "Queen", 12);
					  y++;
					  talia[y] = new Card("Diamonds", "Queen", 12);
					  y++;
					  talia[y] = new Card("Hearts", "Queen", 12);
					  y++;
					  talia[y] = new Card("Spades","Queen",12);
					  y++;
					  break;
				  case 13:
					  talia[y] = new Card("Clubs", "King", 13);
					  y++;
					  talia[y] = new Card("Diamonds", "King", 13);
					  y++;
					  talia[y] = new Card("Hearts", "King",13);
					  y++;
					  talia[y] = new Card("Spades","King",13);
					  y++;
					  break;
				  case 14:
					  talia[y] = new Card("Clubs", "As",14);
					  y++;
					  talia[y] = new Card("Diamonds", "As",14);
					  y++;
					  talia[y] = new Card("Hearts", "As",14);
					  y++;
					  talia[y] = new Card("Spades","As",14);
					  y++;
					  break;
					 
					  
					  
				}
			wartosc_kart++;
		}
		
		Random tasowanie = new Random();
		Card x;
	   
		for(int i =0; i<30; i++)
		{
           int p = tasowanie.nextInt(52);
           int c = tasowanie.nextInt(50);
           
			x = talia[p];
			talia[p] = talia[c];
			talia[c]=x;
		}   
	}

}
